
package Zombies;

import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.ImageIcon;
import javax.swing.JPanel;

/**
 * Autores:
 * Hugo Hiroshi Yamamura
 * Marina Coimbra Viviani
 */

/**
 * Classe: Exeguttor
 * Zumbi tipo planta.
 *
 */
public class Exeguttor extends Zombie{
    private String zombie = "/Sprites/exeggutor.gif";;
    private int type = 2;
    
 /**
 * Construtor: Exeguttor
 * Constroi novo Exeguttor.
 */
    public Exeguttor(){
    
        ImageIcon ii = new ImageIcon(this.getClass().getResource(zombie));
        this.setImage(ii.getImage());
        this.setWidth(this.getImage().getHeight(null));
        this.setHeight(this.getImage().getHeight(null));
        this.setImagew(36);
        this.setVisible(true);

       
    }
     /*
    *
    * Metodo: paint
    * Funcionamento: pinta o Exeguttor no JPanel.
    */
    @Override
    public void paint(Graphics g, JPanel panel){
        if(this.isVisible()){
            Graphics2D g2d = (Graphics2D)g;
            g2d.drawImage(this.getImage(), this.getX(), this.getY(), this.getX()+ this.getImagew(), this.getY() + this.getHeight(), this.getImagex(), 0, this.getImagex()+ this.getImagew(), this.getHeight(), panel);
        }
    }
     /*
    *
    * Metodo: getType
    * Funcionamento: retorna o tipo de pokemon, neste caso, tipo 2.
    */
    @Override
    public int getType(){
        return type;
    }
    
}
